#ifndef GLOBAL_H
#define GLOBAL_H

#include "qtjsonsettings/qtjsonsettings.h"
#include "logmanager/log_global.h"
#include "logencoder/log_encoder.h"
#include "logencoder/log_message_codes.h"
#include "logencoder/log_message_parameters.h"
#include "logencoder/log_app.h"
#include "logencoder/log_class.h"
#include "logencoder/log_obj.h"
#include <QtCore/QSharedDataPointer>
#include <QtCore/QDateTime>

#ifdef Q_OS_UNIX
static const char LOG_FILE_PATH[]       = "/var/log";
static const char PID_FILE[]            = "/var/run/smsbilling.pid";
static const char DEFAULT_CONFIG_PATH[] =
  "/usr/local/etc/smsbilling/config.json";
#else
static const char LOG_FILE_PATH[]       = "./";
static const char DEFAULT_CONFIG_PATH[] = "config.json";
#endif
static const char APP_NAME[]            = "smsbilling";
static const char APP_VERSION[]         = "1.0.0";
static const QString APP_NAME_VERSION   =
  QString("%1 %2").arg(APP_NAME).arg(APP_VERSION);
static const char HELP[]                =
"  [OPTION]...\n"
"Options:\n"
"    -help | -h       Display this help\n"
"    -version | -v    Display program version\n"
"    -config <path>   Override the default path where user config are stored";

static const char HELP_OPTION1[]        = "-h";
static const char HELP_OPTION2[]        = "-help";
static const char VERSION_OPTION1[]     = "-v";
static const char VERSION_OPTION2[]     = "-version";
static const char CONFIG_OPTION[]       = "-config";

static const char UNIX_DAEMON_CLS[]     = "UnixDaemon";

static const char KERNEL_CLS[]          = "Kernel";

static const char KERNEL_KEY[]          = "kernel";
static const char LOG_LEVEL_KEY[]       = "log_level";
static const char SERVER_ID_KEY[]       = "server_id";
static const char DB_HOST_KEY[]         = "db_host";
static const char DB_PORT_KEY[]         = "db_port";
static const char DB_NAME_KEY[]         = "db_name";
static const char DB_UNAME_KEY[]        = "db_uname";
static const char DB_PASS_KEY[]         = "db_pass";
static const char NUM_CONNECT_DB[]      = "num_connect_db";
static const char EXEC_QUERY_TIMEOUT[]  = "exec_query_timeout";

namespace smsbilling {
  enum State {
    STARTED,
    STARTING,
    ERROR,
    STOPING,
    STOPED
  };
} // namespace smsbilling

#endif // GLOBAL_H
